<template>
  <div>
    <van-nav-bar left-arrow class="nav">
      <template #left>
        <van-icon name="wap-home-o" color="#545454" size="25" class="lef" @click="goHome" />
      </template>
      <template #title>
        <div class="title" @click="goHome">网易严选</div>
      </template>

      <template #right>
        <router-link to="/search"><van-icon name="search" color="#545454" size="25" /></router-link>

      </template>
    </van-nav-bar>
  </div>
</template>

<script>
import Vue from "vue";
import { NavBar, Icon } from "vant";
Vue.use(Icon);
Vue.use(NavBar);
export default {
  name: "Nav1",
  methods: {
    goHome() {
      this.$router.replace("/home");
    },
    goShopCart() {
      this.$router.replace("/shopCart");
    },
  },
};
</script>

<style lang="less" scoped>
.nav {
  .title {
    font-size: 20px;
    font-weight: 700;
  }

}
</style>
